//
//  ZZCameraTool.h
//  iOS照相机
//
//  Created by upintech on 17/5/13.
//  Copyright © 2017年 ZZMo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface ZZCameraTool : NSObject

typedef NS_ENUM(NSInteger, CameraToolErrorType) {
    CameraToolErrorTypeDevicedNotSupper = 3001,         //
    CameraToolErrorTypeUserStatusDenied = 3002
};

@property (nonatomic, assign) CGSize imageSize;

// 弹出相机
- (void)showcamera:(UIViewController *_Nullable)controlller result:(void(^ __nullable)(UIImage * __nullable image,NSError * __nullable error))result;

// model 出控制器
- (void)userPhotoLibrary:(UIViewController *__nullable)controller result:(void(^ __nullable)(UIImage * __nullable image,NSError * __nullable error))result;

// 相册和视频
- (void)userPhotoAndVideo:(UIViewController *__nullable)controller result:(void(^ __nullable)(id __nullable result,NSError * __nullable error))result;

//  得到所有的相片
// 必须先调用photoAuthorized 判断是否获取授权
// 成功每次回遍历出相册的每一张相片，没有获取到权限则不输出相片
- (void)enumerateObjectsUsingBlock:(void (^ __nullable)( UIImage * __nullable obj , NSUInteger idx, BOOL  * __nullable stop))block failed:(void(^ __nullable)(NSError * __nullable error))failed;

// 在确定获取
- (NSArray * __nullable)getCameraImageArr;

@end
